import React from 'react';
import ReactDOM from 'react-dom';
import {createBrowserHistory} from 'history';
import './index.css';
import './assets/iconfont/iconfont.scss';
import Home from './pages/home/index';
import Edit from './pages/edit/index';
import Enneagramtest from './pages/enneagramtest/index';
import Result from './pages/result/index';
import ErrorPage from './pages/errorpage/index';

import {BrowserRouter ,HashRouter,MemoryRouter, Route , Switch ,Redirect} from 'react-router-dom';
import reportWebVitals from './reportWebVitals';
const browserHistory = createBrowserHistory()
ReactDOM.render(
  <HashRouter>
        <Switch>
          {/* <Route exact path="/" component={Home} /> */}
          <Route  path="/home/:id/:phone" component={Home} />
          <Route  path="/edit/:id/:info" component={Edit} />
          <Route  path="/enneagramtest/:id/:rid/:pid" component={Enneagramtest} />
          <Route  path="/result/:id/:pid" component={Result} />
          <Route   component={ErrorPage}></Route> 
        </Switch>

      </HashRouter>,
  document.getElementById('root')
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
